package com.lcx.movie.common;
import java.util.HashMap;
import java.util.Map;
/**
 * @author 李丽君
 * @version 1.0
 * @Description 通用实体类
 * @date 2024/12/13 14:58
 */
public class Rep {
    private int code=200;//响应状态码
    private String message="成功";
    private Map<String,Object> data=new HashMap<>();// 存储数据
    // 加一个传入值的方法[链式调用]
    public Rep addData(String key,Object value){
        this.data.put(key,value);
            return this;
    }

    public int getCode() {
        return code;
    }

    public Rep setCode(int code) {
        this.code = code;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public Rep setMessage(String message) {
        this.message = message;
        return this;
    }

    public Map<String, Object> getData() {
        return data;
    }
}
